<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateScoresTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('score', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//关联tyw_users中的id
			$table->integer('uid');
			//int 11 评分选项id 关联tyw_score_options中的id
			$table->integer('option_id');
			//int 11 评份
			$table->integer('score');

			$table->softDeletes();

		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('scores');
	}

}
